<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    class Student{
        // 传值
       static height = 180; 
      static  say(){
            console.log('静态方法 和属性 只能当前的类能调用 下面的 stu 不能再调用');
        }
        constructor(n,a){
            this.name = n;
            this.age = a;
        }
        show(){
            console.log(`请记着我的名字${this.name }`);
        }
    }
    let stu = new Student('狗东',16);
    console.log(stu);
    console.log(stu.name);
    console.log(stu.age);
    stu.show();
    // stu.say();
    Student.say();
   console.log( Student.height);
   console.log(stu.height);
</script>